﻿using System.Collections.Generic;
using System.Web;

namespace NetSurveillance.WebApp.Foundations
{
    /// <summary>
    /// 这里的application使用静态变量来代替，避免反复的装箱拆箱
    /// </summary>
    public class ApplicationContainer : PersistentDataContainer
    {
        public readonly string CacheKeyName = typeof(ApplicationContainer).Name;
        protected override IDictionary<string, object> DataStore
        {
            get
            {
                return ApplicationStore;
            }
        }

        private static readonly IDictionary<string, object> ApplicationStore = new Dictionary<string, object>();

        protected override IDictionary<string, object> RecoveryStore()
        {
            return DataStore;
        }

        protected override void PersistentStore(IDictionary<string, object> store)
        {
        }
    }
}